import request from '@/utils/request'



//【分页查询】根据条件查询工作流项目list
export function queryWorkflowProjectPageResList(data) {
  return request({
    url: 'sysAdmin/workflowProject/queryWorkflowProjectPageResList',
    method: 'post',
    data: JSON.stringify(data)
  })
}

//【可用流程模型选择】根据条件查询所有可供前端选择使用的流程模型
export function queryNormalSelectWorkflowProjectPageResList(data) {
  return request({
    url: 'sysAdmin/workflowProject/queryNormalSelectWorkflowProjectPageResList',
    method: 'post',
    data: JSON.stringify(data)
  })
}


//【查询表单详情】根据工作流项目id查询表单详情
export function queryWorkflowProjectResByProjectId(data) {
  return request({
    url: 'sysAdmin/workflowProject/queryWorkflowProjectResByProjectId',
    method: 'post',
    data: JSON.stringify(data)
  })
}


//【获取工作流配置】根据工作流项目id获取工作流配置
export function queryWorkflowProcessConfig(data) {
  return request({
    url: 'sysAdmin/workflowProject/queryWorkflowProcessConfig',
    method: 'post',
    data: JSON.stringify(data)
  })
}


//【保存】工作流项目
export function saveWorkflowProject(data) {
  return request({
    url: 'sysAdmin/workflowProject/saveWorkflowProject',
    method: 'post',
    data: JSON.stringify(data)
  })
}



//【修改】工作流项目
export function updateWorkflowProject(data) {
  return request({
    url: 'sysAdmin/workflowProject/updateWorkflowProject',
    method: 'post',
    data: JSON.stringify(data)
  })
}



//【删除】根据工作流项目id删除工作流
export function deleteWorkflowProjectByProjectId(data) {
  return request({
    url: 'sysAdmin/workflowProject/deleteWorkflowProjectByProjectId',
    method: 'post',
    data: JSON.stringify(data)
  })
}



//【作废流程】根据工作流项目id作废工作流
export function invalidWorkflowProjectByProjectId(data) {
  return request({
    url: 'sysAdmin/workflowProject/invalidWorkflowProjectByProjectId',
    method: 'post',
    loadingFlag:true,
    loadingMsg:"正在作废中...",
    data: JSON.stringify(data)
  })
}

//【发布工作流模型】发布工作流模型
export function releaseWorkflowProject(data) {
  return request({
    url: 'sysAdmin/workflowProject/releaseWorkflowProject',
    method: 'post',
    loadingFlag:true,
    loadingMsg:"正在发布中...",
    data: JSON.stringify(data)
  })
}


//【获取工作流图片】根据工作流项目id获取工作流图片
export function queryWorkflowProcessReadImage(data) {
  return request({
    url: 'sysAdmin/workflowProject/queryWorkflowProcessReadImage',
    method: 'post',
    data: JSON.stringify(data)
  })
}


//【查询明细】根据项目id查询项目明细
export function queryWorkflowProjectDetailsResByProjectId(data) {
  return request({
    url: 'sysAdmin/workflowProject/queryWorkflowProjectDetailsResByProjectId',
    method: 'post',
    data: JSON.stringify(data)
  })
}
